
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mytools;

import com.opensymphony.xwork2.ActionSupport;

/**

 *

 * @author wl

 */
public class userdeletemany extends ActionSupport {

    private String[] userid;
    private userDAO ud;

    public userdeletemany() {
    }

    public String execute() throws Exception {
        setUd(new userDAO());
        if (getUserid() != null) {
            for (int i = 0; i < getUserid().length; i++) {
                getUd().deleteUser(Integer.parseInt(getUserid()[i]));
            }
        }
        return SUCCESS;

    }

    /**
     * @return the userid
     */
    public String[] getUserid() {
        return userid;
    }

    /**
     * @param userid the userid to set
     */
    public void setUserid(String[] userid) {
        this.userid = userid;
    }

    /**
     * @return the ud
     */
    public userDAO getUd() {
        return ud;
    }

    /**
     * @param ud the ud to set
     */
    public void setUd(userDAO ud) {
        this.ud = ud;
    }
}
